﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data;
using MySql.Data.MySqlClient;
using Utilities.QuickSql;

namespace WindowsFormsApplication1
{
    public partial class gest_modele : Form
    {
        MySqlDatabase db = new MySqlDatabase("localhost", "B2_CS2I", "motdepasse", "projets4");

        public gest_modele()
        {
            InitializeComponent();

            dataGrid_modele.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }

        private void gest_modele_Load(object sender, EventArgs e)
        {
            // TODO: cette ligne de code charge les données dans la table 'projets4DataSet.modele'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
            this.modeleTableAdapter.Fill(this.projets4DataSet.modele);

        }

        private void dataGrid_modele_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            
            //string nomModele = db.QueryValue<string>("SELECT * FROM modele WHERE id_modele ='" + dataGrid_modele.SelectedRows[0].Cells[0].Value.ToString() + "'");
            //this.textBox_NomModele.Text = nomModele;

            
        }
    }
}
